package fivestar.controller.service.impl;

import java.util.List;

import fivestar.controller.service.GuestService;
import fivestar.model.dao.GuestDao;
import fivestar.model.entity.Guest;

public class GuestServiceImpl implements GuestService{

	 private GuestDao guestDao;
	
	public void setGuestDao(GuestDao guestDao) {
		this.guestDao = guestDao;
	}

	@Override
	public void create(Guest guest) throws RuntimeException { 
		  guestDao.create(guest);
	}

	@Override
	public void delete(Guest guest) throws RuntimeException { 
		guestDao.delete(guest);
	}

	@Override
	public void update(Guest guest) throws RuntimeException { 
		guestDao.update(guest);
	}

	@Override
	public Guest find(String dni) throws RuntimeException { 
		return guestDao.find(dni);
	}

	@Override
	public List<Object[]> findAll() throws RuntimeException { 
		return guestDao.findAll();
	}

	@Override
	public List<Object[]> findlByDni(String dni) throws RuntimeException { 
		return guestDao.findlByDni(dni);
	}

	@Override
	public List<Object[]> findlByLastName(String lastName) throws RuntimeException {
		return guestDao.findlByLastName(lastName);
	}

 

 

}
